#pragma once

#include "stdafx.h"
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Net;
using namespace System::Net::Sockets;
using namespace System::Text;
using namespace System::Threading;

ref class TcpManager
{
public:
	String^ host;
	String^ port;
	enum class TcpMode {Client, Server};

	TcpManager(String^ host, String^ port);
	void Connect();
	void Accept();
	int SendFrame();
	void Disconnect();
	static void WaitForKey();
private:
	void WriteToFile(System::String^);
	TcpClient^ client;
	NetworkStream^ stream;
};
